# coding: UTF-8
# ----------
# Project_Name : pythonProject
# File_Name : huangcongbing
# Author : asus
# Date_Time:2022/4/22 10:38
# Description :
# ----------
from selenium import  webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
def foo1():
    driver = webdriver.Chrome()
    driver.maximize_window()
    driver.get(r"D:\pyworkspace\T79\pythonProject\selenium3\example.html")
    time.sleep(3)
    #直接将文件路径输入到上传按键<input>
    driver.find_element(By.NAME,'attach[]').send_keys(r"C:\Users\asus\Desktop\123\th.jpg")
    time.sleep(2)

    driver.quit()


if __name__ == "__main__":
    foo1()